fun main() {
    var point1 = Point(1, 2)
    var point2 = Point(1, 2)
    point1 += point2
    println(point1)
}

data class Point(var x: Int, var y: Int) {
/*    operator fun plus(point: Point): Point {
        return Point(this.x + point.x, this.y + point.y)
    }*/

    override fun toString(): String {
        return "Point(x=$x, y=$y)"
    }
    operator fun plusAssign(point: Point) {
        this.x += point.x
        this.y += point.y
    }
    operator fun minus(point: Point): Point {
        return Point(this.x + point.x, this.y + point.y)
    }

    operator fun minusAssign(point: Point) {
        this.x += point.x
        this.y += point.y
    }
}